#ifndef MYLINE_H
#define MYLINE_H
#include<QVector>
#include<QMouseEvent>
#include<QWidget>
#include<QPaintEvent>

class QMouseEvent;
class MyLine
{
public:
    //MyLine();
    MyLine();
    MyLine(QPointF p1, QPointF p2);
    ~MyLine();

    void LineSeg();
    void SetLastPosition(QPointF lp);
    void SetCurPossition(QPointF cp);
    QLineF MakeLine();
    QPointF GetLastP();
    QPointF GetCurP();

    /*void mousePressEvent(QMouseEvent *event);
    void mouseMoveEvent(QMouseEvent *event);
    void mouseReleaseEvent(QMouseEvent *event);
    void paintEvent(QPaintEvent *);*/
private:
    QPointF lastPoint,curPoint;
    bool bDraw;//isDrawed?
    bool bSelLine;//isSelected?
    bool bSelStarPt;//起点
    bool bSelEndPt;//终点
};

#endif // MYLINE_H
